package com.autonavi.abs.generator.common.enumeration;

/**
 * @author tianquan.ld
 * @version V1.0
 * <p>Description: 数据库类型</p>
 * @date 2020-08-10 17:25
 */
public enum DbTypeEnum {

    Tddl("tddl"),
    Adb("adb"),
    ;

    /**
     * 数据库类型
     */
    private String type;

    DbTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    /**
     * 获取db类型
     *
     * @param type
     * @return
     */
    public static DbTypeEnum getDbType(String type) {
        for (DbTypeEnum item : DbTypeEnum.values()) {
            if (item.getType().equals(type)) {
                return item;
            }
        }
        return null;
    }

}
